#include "Stack.h"

void stacktest1()
{
    ST st;
    StackInit(&st);
    StackPush(&st, 1);
    StackPush(&st, 2);
    StackPush(&st, 3);
    StackPush(&st, 4);
    StackPush(&st, 5);
    StackPush(&st, 6);

    printf("%d\n", StackTop(&st));

    StackPop(&st);
    StackPop(&st);
    StackPop(&st);
    StackPop(&st);
    StackPop(&st);
    StackPop(&st);

    StackDestroy(&st);
}

void stacktest2()
{
    ST st;
    StackInit(&st);
    StackPush(&st, 1);
    StackPush(&st, 2);

    printf("%d ", StackTop(&st));
    StackPop(&st);

    StackPush(&st, 3);
    StackPush(&st, 4);

    printf("%d ", StackTop(&st));
    StackPop(&st);

    StackPush(&st, 5);
    StackPush(&st, 6);

    while (!StackEmpty(&st))
    {
        printf("%d ", StackTop(&st));
        StackPop(&st);
    }

    StackDestroy(&st);
}

int main()
{

    // stacktest1();
    stacktest2();
    return 0;
}